package org.example;

import com.bianmaba.spring.mvc.config.annotation.EntityParam;
import org.example.bean.entity.authorization.User;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;
import java.util.Set;

@RestController
@RequestMapping("param")
public class TestController {


    @RequestMapping(value = "/map")
    public Object map(@EntityParam Map<String, User> params) {
        System.out.println(params);
        return params;
    }

    @RequestMapping(value = "/map1")
    public Object map1(@EntityParam Map<String, Map<String, String>> params) {
        System.out.println(params);
        return params;
    }

    @RequestMapping(value = "/set")
    public Object map(@EntityParam Set params) {
        System.out.println(params);
        return params;
    }

    @RequestMapping(value = "/list")
    public Object map(@EntityParam List<User> params) {
        System.out.println(params);
        return params;
    }

    @RequestMapping(value = "/array")
    public Object map(@EntityParam String[] params) {
        System.out.println(params);
        return params;
    }

    @RequestMapping(value = "/array1")
    public Object map(@EntityParam User[] params) {
        System.out.println(params);
        return params;
    }
}
